
#Simply define the cc to CC as a macro.

CC=g++
NAMOBJ=stringsop
LTest=LEDATest
LPath=$(LEDAROOT)
CPPFLAGS := -march=i486 -pthread -O2 -Wall -Wfatal-errors --warn-error -DLEDA_MULTI_THREAD -g

XLIB    := -lX11
UNIXLIB := -lleda $(XLIB) -lm

LD_FLAGS := -I$(LPath)/incl -L$(LPath)

#End define macro.

#Start makefile:the first entry of the makefile is "all".
#Then different assignments are arranged by the "all" tab.
#For this particular instance,$(GENOBJ) is firstly carried out and then is the line $(GENEXE).

.PHONY			:all clean

all	:Obj Exe

Exe	:$(LTest)/$(addsuffix .o,$(NAMOBJ))
	$(CC) -L$(LPath) $(LTest)/$(addsuffix .o,$(NAMOBJ)) $(UNIXLIB) -o $(LTest)/$(NAMOBJ)

Obj	:$(LTest)/$(addsuffix .cpp,$(NAMOBJ))
	$(CC) -I$(LPath)/incl -c $(LTest)/$(addsuffix .cpp,$(NAMOBJ)) -o $(LTest)/$(NAMOBJ).o

clean	:
	rm -f *.o *.gch '#'*.c'#' $(LTest)/*.o
